﻿<%@ Page Title="View & Add Expenses" Language="C#" MasterPageFile="~/Layout.master"
    AutoEventWireup="true" CodeFile="ExpenseHead.aspx.cs" Inherits="Secured_ExpenseHead"
    Theme="Default" Buffer="true" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="PlaceHolder1" runat="Server">
    <div style="font-size: medium">
        View Expense Heads
    </div>
    <div>
        <asp:Literal ID="ltMsg" runat="server" />
    </div>
    <div>
        <asp:GridView ID="grdExpenses" runat="server" AutoGenerateColumns="False" CellPadding="4"
            EnableModelValidation="True" AutoGenerateDeleteButton="True"
            AutoGenerateEditButton="True" DataKeyNames="HeadID,ExpenseHead" 
            BackColor="White" BorderColor="#CC9966" BorderStyle="None" BorderWidth="1px">
            <FooterStyle BackColor="#FFFFCC" ForeColor="#330099" />
            <HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="#FFFFCC" />
            <PagerStyle BackColor="#FFFFCC" ForeColor="#330099" HorizontalAlign="Center" />
            <RowStyle BackColor="White" ForeColor="#330099" />
            <SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="#663399" />
            <EmptyDataTemplate>
                No Data Fetched
            </EmptyDataTemplate>
            <AlternatingRowStyle BackColor="#FFDD97" />
            <Columns>
                <asp:BoundField DataField="HeadID" Visible="false" />
                <asp:TemplateField HeaderText="Expense Head">
                    <ItemTemplate>
                        <%# Eval("ExpenseHead") %>
                    </ItemTemplate>
                    <EditItemTemplate>
                        <asp:TextBox ID="txtExpenseHead" runat="server" Text='<%# Eval("ExpenseHead") %>' />
                    </EditItemTemplate>
                </asp:TemplateField>
            </Columns>
        </asp:GridView>
    </div>
    <br />
    <div>
        <strong>Add New Head:</strong><br />
        <asp:TextBox ID="txtNewHead" runat="server" Width="300px" /><br />
        <asp:Button ID="btnAddHead" runat="server" Text="Add Head" 
            onclick="btnAddHead_Click" />
    </div>
</asp:Content>
